﻿@model IEnumerable<WebDKMH.Models.thongbao1>
@{
    ViewBag.Title = "thongbao";
    Layout = "~/Views/Shared/admin.cshtml";
}

@*<div class="Content-midle-Top-Ten"><h4> ► Sửa thông báo</h4></div>*@
<div class="Main-Content-1">
    <div class="Main-Content-1-Tieude">
        <img src="~/Images/icon_dangky.png" />
        <ul>
            <li>
                <h2>SỬA THÔNG BÁO</h2>
            </li>
        </ul>
    </div>
    <div class="Main-Content-1-Noidung">
        <p></p>
        <table border="1" cellspacing="0" style="border: 1px groove #0976f5; width: 750px; margin: auto; ">
            <tr style=" color: #ffffff; background: #4395f5;">
                <th style="width:53px;">STT </th>
                <th style="width:410px;">Tiêu Đề</th>
                <th style="width:68px">Chi Tiết</th>
                
                <th style="width:60px">Xóa</th>
                <th style="width:60px;">Đăng/Hủy</th>
                <th style="width:60px">Mới/Cũ</th>
                <th style="width:83px">Kích Hoạt</th>
            </tr>
            @{int k =0;}
            @foreach(var tb in Model)
{
    k = k + 1;
                <tr style="color: #0c1574; border-collapse: collapse; ">

                    <td style="padding-left:5px">@k</td>
                    <td>@tb.tieude</td>
                    <td style="text-decoration: underline;"><a name="chitiet" href=@Url.Action("dangthongbao","admin", new {type = "edit",id1 =tb.id})>Chi Tiết</a> </td>


                    <td style="padding-left: 15px; text-decoration: underline;"><a href=@Url.Action("Xoa", "admin", new { id1=tb.id})>Xóa</a></td>
                    <td style="text-decoration: underline; padding-left:15px">
                        @if (tb.tgdk == false || tb.tgdk == null)
                        {
                            <a href=@Url.Action("tgdk", "admin", new { id1 = tb.id })>Đăng</a>
                        }
                        else if (tb.tgdk == true)
                        {
                            <a href=@Url.Action("tgdk", "admin", new { id1 = tb.id })>Hủy</a>
                        }
                    </td>
                    <td style="text-decoration: underline; padding-left:15px">
                        @if (tb.@new == false || tb.@new == null)
                        {
                            <a href=@Url.Action("moi", "admin", new { id1=tb.id})>Cũ</a>
                        }
                        else if (tb.@new == true)
                        {
                            <a href=@Url.Action("moi", "admin", new { id1=tb.id})>Mới</a>
                        }
                    </td>
                    <td style="text-decoration: underline;">
                        @if (tb.kichhoat == false || tb.kichhoat == null)
                        {
                            <a href=@Url.Action("kichhoat", "admin", new { id1=tb.id})>Kích Hoạt</a>
                        }
                        else if (tb.kichhoat == true)
                        {
                            <a href=@Url.Action("kichhoat", "admin", new { id1=tb.id})>Hủy</a>
                        }
                        </td>

                    </tr>
}
        </table>
        <a href=@Url.Action("dangthongbao", "admin", new { type="add",id1=0})> <input style=" width: 80px; height: 30px; float: left;margin-left :360px;   margin-top: 20px;" type="submit" value="Đăng TB" /></a>
        @*<input style=" width: 80px; height: 30px; float: right; margin-right:200px;   margin-top: 20px;" id="Xuat" type="reset" value="Xuất Flie" />*@
    </div>
</div>
